﻿@model ShippingSettingsModel
@{
    ViewBag.Title = T("Admin.Configuration.Settings.Shipping").Text;
}
@using (Html.BeginForm())
{       
    <div class="section-header">
        <div class="title">
            <i class="fa fa-truck"></i>
            @T("Admin.Configuration.Settings.Shipping")
        </div>
        <div class="options">
            <button type="submit" name="save" value="save" class="btn btn-warning">
				<i class="fa fa-check"></i>
				<span>@T("Admin.Common.Save")</span>
			</button>
        </div>
    </div>

    Html.RenderAction("StoreScopeConfiguration", "Setting");

    @Html.ValidationSummary(false)

    <table class="adminContent">
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.FreeShippingOverXEnabled)
            </td>
            <td class="adminData">
				@Html.SettingEditorFor(model => model.FreeShippingOverXEnabled, Html.CheckBoxFor(model => model.FreeShippingOverXEnabled, new { data_toggler_for = "#pnlFreeShipping" }))
                @Html.ValidationMessageFor(model => model.FreeShippingOverXEnabled)
            </td>
        </tr>
		<tbody id="pnlFreeShipping">
			<tr id="pnlValueOfX">
				<td class="adminTitle">
					@Html.SmartLabelFor(model => model.FreeShippingOverXValue)
				</td>
				<td class="adminData">
					@Html.SettingEditorFor(model => model.FreeShippingOverXValue, null, new { postfix = Model.PrimaryStoreCurrencyCode })
					@Html.ValidationMessageFor(model => model.FreeShippingOverXValue)
				</td>
			</tr>
			<tr id="pnlValueOfXincltax">
				<td class="adminTitle">
					@Html.SmartLabelFor(model => model.FreeShippingOverXIncludingTax)
				</td>
				<td class="adminData">
					@Html.SettingEditorFor(model => model.FreeShippingOverXIncludingTax)
					@Html.ValidationMessageFor(model => model.FreeShippingOverXIncludingTax)
				</td>
			</tr>
		</tbody>
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.EstimateShippingEnabled)
            </td>
            <td class="adminData">
                @Html.SettingEditorFor(model => model.EstimateShippingEnabled)
                @Html.ValidationMessageFor(model => model.EstimateShippingEnabled)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.DisplayShipmentEventsToCustomers)
            </td>
            <td class="adminData">
                @Html.SettingEditorFor(model => model.DisplayShipmentEventsToCustomers)
                @Html.ValidationMessageFor(model => model.DisplayShipmentEventsToCustomers)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.SkipShippingIfSingleOption)
            </td>
            <td class="adminData">
                @Html.SettingEditorFor(model => model.SkipShippingIfSingleOption)
                @Html.ValidationMessageFor(model => model.SkipShippingIfSingleOption)
            </td>
        </tr>
        <tr>
            <td class="adminTitle">
                @Html.SmartLabelFor(model => model.ChargeOnlyHighestProductShippingSurcharge)
            </td>
            <td class="adminData">
                @Html.SettingEditorFor(model => model.ChargeOnlyHighestProductShippingSurcharge)
                @Html.ValidationMessageFor(model => model.ChargeOnlyHighestProductShippingSurcharge)
            </td>
        </tr>
		<tr>
			<td class="adminTitle">
				@Html.SmartLabelFor(model => model.ShippingOriginAddress)
			</td>
			<td class="adminData">
				@Html.SettingEditorFor(model => Model.ShippingOriginAddress, @<div>
					@Html.EditorFor(model => model.ShippingOriginAddress, "Address")
				</div>)
			</td>
		</tr>
    </table>
}